#ifndef FOLDERINDEX_H
#define FOLDERINDEX_H

#include <QtGui/QMainWindow>
#include <QSystemTrayIcon>
#include <QCloseEvent>
#include <QFileDialog>
#include <QMessageBox>
#include <QSettings>
#include <QFileDialog>
#include <QMenu>

#include "folderslistwindow.h"
#include "inputfolderdialog.h"
#include "viewmodesettingsform.h"
#include "listwindow.h"

namespace Ui
{
    class folderIndex;
}

class folderIndex : public QMainWindow
{
    Q_OBJECT

public:
    folderIndex(QWidget *parent = 0);
    ~folderIndex();
protected:
    void closeEvent(QCloseEvent *event);

private:
    Ui::folderIndex *ui;

    // system icon's
    QSystemTrayIcon *trayIcon;
    QMenu *trayIconMenu;

    QAction *showAction;
    bool notifyShown;

    // forms
    viewModeSettingsForm * myViewsForm;

    QString getLastSourceFolder() const;
    void setLastSourceFolder( const QString &path );

private slots:
    void on_actionSettings_triggered();
    void on_actionOpen_triggered();
    void on_indexFolderButton_clicked();
    void on_indexFtpButton_clicked();
    void on_indexListButton_clicked();

    void createActions();
    void initActions();

    void initSysTray();
    void iconActivated(QSystemTrayIcon::ActivationReason reason);
};

#endif // FOLDERINDEX_H
